<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>My App</title>
    <link rel="stylesheet" href="../../packages/core/css/framework7.min.css">
    <link rel="stylesheet" href="../../css/framework7-icons.css">
  </head>
  <body>
    <div id="app"></div>
    <template id="app-template">
      <f7-app>
        <f7-view main>
          <f7-page>
            <f7-navbar title="Chips"></f7-navbar>
      
            <f7-block-title>Chips With Text</f7-block-title>
            <f7-block strong>
              <f7-chip text="Example Chip"></f7-chip>
              <f7-chip text="Another Chip"></f7-chip>
              <f7-chip text="One More Chip"></f7-chip>
              <f7-chip text="Fourth Chip"></f7-chip>
              <f7-chip text="Last One"></f7-chip>
            </f7-block>
      
            <f7-block-title>Outline Chips</f7-block-title>
            <f7-block strong>
              <f7-chip outline text="Example Chip"></f7-chip>
              <f7-chip outline text="Another Chip"></f7-chip>
              <f7-chip outline text="One More Chip"></f7-chip>
              <f7-chip outline text="Fourth Chip"></f7-chip>
              <f7-chip outline text="Last One"></f7-chip>
            </f7-block>
      
            <f7-block-title>Icon Chips</f7-block-title>
            <f7-block strong>
              <f7-chip text="Add Contact" media-bg-color="blue">
                <f7-icon slot="media" ios="f7:add_round" md="material:add_circle"></f7-icon>
              </f7-chip>
              <f7-chip text="London" media-bg-color="green">
                <f7-icon slot="media" ios="f7:compass" md="material:location_on"></f7-icon>
              </f7-chip>
              <f7-chip text="John Doe" media-bg-color="red">
                <f7-icon slot="media" ios="f7:person" md="material:person"></f7-icon>
              </f7-chip>
            </f7-block>
      
            <f7-block-title>Contact Chips</f7-block-title>
            <f7-block strong>
              <f7-chip text="Jane Doe">
                <img slot="media" src="http://lorempixel.com/100/100/people/9/"/>
              </f7-chip>
              <f7-chip text="John Doe">
                <img slot="media" src="http://lorempixel.com/100/100/people/3/"/>
              </f7-chip>
              <f7-chip text="Adam Smith">
                <img slot="media" src="http://lorempixel.com/100/100/people/7/"/>
              </f7-chip>
              <f7-chip text="Jennifer" media-bg-color="pink" media="J"></f7-chip>
              <f7-chip text="Chris" media-bg-color="yellow" media-text-color="black" media="C"></f7-chip>
              <f7-chip text="Kate" media-bg-color="red" media="K"></f7-chip>
            </f7-block>
      
            <f7-block-title>Deletable Chips / Tags</f7-block-title>
            <f7-block strong>
              <f7-chip text="Example Chip" deleteable @click="deleteChip"></f7-chip>
              <f7-chip text="Chris" media="C" media-bg-color="orange" text-color="black" deleteable @click="deleteChip"></f7-chip>
              <f7-chip text="Jane Doe" deleteable @click="deleteChip">
                <img slot="media" src="http://lorempixel.com/100/100/people/9/"/>
              </f7-chip>
              <f7-chip text="One More Chip" deleteable @click="deleteChip"></f7-chip>
              <f7-chip text="Jennifer" media-bg-color="pink" media="J" deleteable @click="deleteChip"></f7-chip>
              <f7-chip text="Adam Smith" deleteable @click="deleteChip">
                <img slot="media" src="http://lorempixel.com/100/100/people/7/"/>
              </f7-chip>
            </f7-block>
      
            <f7-block-title>Color Chips</f7-block-title>
            <f7-block strong>
              <f7-chip text="Red Chip" color="red"></f7-chip>
              <f7-chip text="Green Chip" color="green"></f7-chip>
              <f7-chip text="Blue Chip" color="blue"></f7-chip>
              <f7-chip text="Orange Chip" color="orange"></f7-chip>
              <f7-chip text="Pink Chip" color="pink"></f7-chip>
              <f7-chip outline text="Red Chip" color="red"></f7-chip>
              <f7-chip outline text="Green Chip" color="green"></f7-chip>
              <f7-chip outline text="Blue Chip" color="blue"></f7-chip>
              <f7-chip outline text="Orange Chip" color="orange"></f7-chip>
              <f7-chip outline text="Pink Chip" color="pink"></f7-chip>
            </f7-block>
          </f7-page>
        </f7-view>
      </f7-app>
      
    </template>
    <script>
      var component = {
        methods: {
          deleteChip(e) {
            const $$ = this.$$;
            const app = this.$f7;
            const target = e.target;
            app.dialog.confirm('Do you want to delete this tiny demo Chip?', () => {
              $$(target).parents('.chip').remove();
            });
          },
        },
      }
    </script>
    <script src="../../packages/vue/vue.min.js"></script>
    <script src="../../packages/vue/framework7-vue.min.js"></script>
    <script src="../../packages/core/js/framework7.min.js"></script>
    <script>
      var theme = 'ios';
      if (location.href.indexOf('theme=md') >= 0) theme = 'md';
      
      if (Framework7.use) Framework7.use(Framework7Vue, { theme: theme });
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(Framework7Vue, { theme: theme });
      
      var plugin = {
        params: {
          theme: theme,
        }
      };
      
      if (Framework7.use) Framework7.use(plugin);
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(plugin);
      
      if (typeof component === 'undefined') {
        var component = {};
      }
      if (typeof routes === 'undefined') {
        var routes = [];
      }
      component.el = '#app';
      component.template = '#app-template';
      
      new Vue(component);
    </script>
  </body>
</html>